﻿using Mes.Domain.BoundedContext;
using Mes.Application.DTO.Inputs.Operations;
using Mes.Application.DTO.Results.Operations;

namespace Mes.Application.Services.Operations
{
    public interface IProcessService
    {
        /// <summary>
        /// 新增工艺
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddProcessAsync(AddingProcessInput input);

        /// <summary>
        /// 编辑工艺
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateProcessAsync(UpdatingProcessInput input);

        /// <summary>
        /// 删除工艺
        /// </summary>
        /// <param name="process_id"></param>
        /// <returns></returns>
        Task DeleteProcessAsync(string process_id);

        /// <summary>
        /// 查询指定工艺下的工序
        /// </summary>
        /// <param name="process_id"></param>
        /// <returns>List<string></returns>
        Task<List<string>> GetProcessOpersAsync(string process_id);

        /// <summary>
        /// 分页查询工艺
        /// </summary>
        /// <param name="input"></param>
        /// <returns>PagedItemsData<ProcessesResult></returns>
        Task<PagedItemsData<ProcessesResult>> GetProcessesAsync(QueryingProcessesInput input);

        /// <summary>
        /// 查询指定工艺
        /// </summary>
        /// <param name="process_id"></param>
        /// <returns>CurrentProcessResult</returns>
        Task<CurrentProcessResult> GetProcessAsync(string process_id);

        /// <summary>
        /// 编辑工艺状态
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateProcessStatusAsync(UpdatingProcessStatusInput input);

        /// <summary>
        /// 编辑工艺下工序的顺序
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task MovingOperSequenceAsync(MovingOperSequenceInput input);

        /// <summary>
        /// 判断工艺是否存在工序
        /// </summary>
        /// <param name="process_id"></param>
        /// <returns>true/false</returns>
        Task<bool> ProcessHasOpersAsync(string process_id);

        /// <summary>
        /// 通过工艺路线添加工序
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddProcessOpersAsync(AddProcessOpersInput input);
    }
}
